<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>组件的定义和分类</title>
    <script src="js/vue.js"></script>
</head>

<body>
    <div id="app">
        <H1></H1>
        <ruanmou></ruanmou>
        <hello></hello>
    </div>

    <template id="d1">
        <div>
            <div>软谋教育欢迎你</div>
            <h1>aaaaa</h1>
        </div>
    </template>
    <script>
        Vue.component("ruanmou", {
            template: "#d1"
        });
        var vm = new Vue({
            el: "#app",
            components: {
                "hello": {
                    template: "<h1>我是局部组件</h1>"
                }
            }
        });
    </script>
</body>

</html>